package com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.controller;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.shtel.paas.monitorcenter.util.Page;
import com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.entity.OracleMonitorDto;
import com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.service.OracleMonitorService;
import com.shtel.paas.sdk.core.RefreshableRestController;
import com.shtel.paas.sdk.core.mybatis.EnablePaasMybatis;

/**  
* @Description: 
* @author zhangyy  
* @date 2018年6月5日    
*/
@EnablePaasMybatis
@MapperScan("com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.mapper")
@RefreshableRestController
public class OracleMonitorController {
	
	@Autowired
	OracleMonitorService oracleMonitorService;
	
	//oracle监控分页查询
	@GetMapping("/selectOracleMonitorInfo")
	public Page<OracleMonitorDto> selectDistributeaddDatabaseMonitorInfo(
			@RequestParam("page") Integer page,
			@RequestParam("size") Integer pageSize,
			@RequestParam("hostName") String hostName,
			@RequestParam("systemName") String systemName) {
		OracleMonitorDto parameter = new OracleMonitorDto();
		parameter.setPage(page);
		parameter.setSize(pageSize);
		parameter.setHostName(hostName);
		parameter.setSystemName(systemName);
		Page<OracleMonitorDto> result = oracleMonitorService.selectOracleMonitorInfo(parameter);
		return result;
	}
}
